#!/usr/bin/env python
#    dft_open_b3lyp
#    ------------------
#    Molecule:         BeH
#    Wave Functions:   Open-shell DFT B3LYP / AhlrichsVTZ
#    Test Purpose:     Open-shell DFT B3LYP properties test w/o symmetry.

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()
f.add(string = 'Final DFT energy',
      rel_tolerance = 1.0e-8)

f.add(from_string = 'Dipole moment',
      num_lines = 5,
      mask = [1],
      rel_tolerance = 1.0e-5)

f.add(from_string = 'Dipole moment components',
      num_lines = 9,
      mask = [1],
      abs_tolerance = 1.0e-6)

test.run(['dft_open_b3lyp.dal'], ['BeH_Ahlrichs-VTZ.mol'], f={'out': f})

sys.exit(test.return_code)
